package com.x.erp.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.x.erp.dao.DistrictDao;
import com.x.erp.model.District;
import com.x.erp.rpc.DistrictRpcService;
import com.x.framework.exception.BusinessException;
import com.x.framework.exception.ExceptionCode;
import com.x.framework.service.BaseService;

@Component
@Service(interfaceName = "com.x.erp.rpc.DistrictRpcService", timeout = 60000)
public class DistrictService extends BaseService implements DistrictRpcService {

	@Autowired
	private DistrictDao districtDao;

	@Override
	public List<District> selectDistrictList(District district) {
		try {
			return districtDao.selectDistrictList(district);
		} catch (Exception e) {
			throw new BusinessException(ExceptionCode.EXCEPTION_CODE0011, e);
		}
	}

}
